package com.example.javanewwork.service.impl;

import com.example.javanewwork.entity.User;
import com.example.javanewwork.mapper.UserMapper;
import com.example.javanewwork.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User findByUserName(String username) {
        User u =userMapper.findByUserName(username);
        return u;
    }

    @Override
    public void register(String username, String password, String Email, String phone, Integer UserType) {
        userMapper.add(username,password,Email,phone,UserType);
    }

}

